<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">礼品名称</label>
            <div class="layui-input-block">
                <input name="name" required placeholder="请输入礼品名称" value="{$vo.name|default=''}" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-block">
                <input name="type" placeholder="如：日用品/食品/其他" value="{$vo.type|default=''}" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">所需积分</label>
            <div class="layui-input-block">
                <input name="points_required" required type="number" min="1" placeholder="请输入所需积分" value="{$vo.points_required|default=''}" class="layui-input" data-blur-number="0">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">库存</label>
            <div class="layui-input-block">
                <input name="stock" type="number" placeholder="-1 表示不限" value="{$vo.stock|default='-1'}" class="layui-input" data-blur-number="0">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">图片</label>
            <div class="layui-input-block">
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs9">
                        <input name="image" placeholder="请选择或粘贴图片地址" value="{$vo.image|default=''}" class="layui-input">
                    </div>
                    <div class="layui-col-xs3">
                        <a class="layui-btn layui-btn-normal layui-btn-fluid" data-file data-field="image">选择图片</a>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-block">
                <textarea name="description" placeholder="可选" class="layui-textarea">{$vo.description|default=''}</textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input name="sort" type="number" value="{$vo.sort|default='0'}" class="layui-input" data-blur-number="0">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <label class="think-radio"><input type="radio" name="status" value="1" lay-ignore {eq name='vo.status|default=1' value='1'}checked{/eq}> 上架</label>
                <label class="think-radio"><input type="radio" name="status" value="0" lay-ignore {eq name='vo.status|default=1' value='0'}checked{/eq}> 下架</label>
            </div>
        </div>
    </div>

    <div class="layui-card-body text-center">
        <button class="layui-btn" type="submit">保存</button>
        <button class="layui-btn layui-btn-danger" type="button" data-close>取消</button>
    </div>
</form>

